STEP 9: How do we know if the user's color exists? We should test this before we use the user's input for the stars.

  • Luckily, we've made a testing function for this exact scenario!
  • In , drag Function Call with Parameter inside get_user_input().
  • Change my_function to test_color and my_var to color.
  • Click Run and try inputting a color that doesn't exist. See how the computer throws an error?

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)